package cn.wowjoy.pda.android_pharmacy.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import cn.wowjoy.pda.android_pharmacy.R;
import cn.wowjoy.pda.android_pharmacy.common.core.BaseActivity;
import cn.wowjoy.pda.android_pharmacy.databinding.ActivityPharmacyBinding;
import cn.wowjoy.pda.android_pharmacy.mvvm.presenter.PharmacyPresenter;
import cn.wowjoy.pda.android_pharmacy.mvvm.vm.PharmacyViewModel;
import cn.wowjoy.pda.android_pharmacy.ui.activity.door.DoorTaskActivity;
import cn.wowjoy.pda.android_pharmacy.ui.activity.hospital.InHospitalTaskActivity;
import cn.wowjoy.pda.android_pharmacy.ui.activity.staticH.StaticTaskActivity;

public class PharmacyActivity extends BaseActivity<ActivityPharmacyBinding, PharmacyViewModel, PharmacyPresenter> implements View.OnClickListener {
//    private String[] mStrings={"门诊药房","住院药房","静配药房"};

    @Override
    protected void init(Bundle savedInstanceState) {
        binding.incTitle.titleTextTv.setText("选择药房");
        binding.incTitle.titleTextTv.setTextColor(this.getResources().getColor(R.color.white));

        binding.rlDoorPharmacy.setOnClickListener(this);
        binding.rlInHospitalPharmacy.setOnClickListener(this);
        binding.rlStaticDeployPharmacy.setOnClickListener(this);


    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_pharmacy;
    }

    @Override
    protected Class<PharmacyPresenter> getPresenterClass() {
        return PharmacyPresenter.class;
    }

    @Override
    protected Class<PharmacyViewModel> getViewModelClass() {
        return PharmacyViewModel.class;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.rl_door_pharmacy:
                startActivity(new Intent(PharmacyActivity.this,DoorTaskActivity.class));
                break;
            case R.id.rl_inHospital_pharmacy:
                startActivity(new Intent(PharmacyActivity.this,InHospitalTaskActivity.class));
                break;
            case R.id.rl_staticDeploy_pharmacy:
                startActivity(new Intent(PharmacyActivity.this,StaticTaskActivity.class));
                break;
        }
    }
}
